package com.gjintel.workflow.trade.service;

import java.text.ParseException;

import com.gjintel.auction.business.model.AuctionInfo;
import com.gjintel.business.webcontent.model.WebContent;
import org.activiti.engine.runtime.Execution;

public interface IExecutionService {

    /**
     * 统一修改状态类
     *
     * @param execution  :执行流实例
     * @param statusCode :流程状态码
     */
    public void alterStatusAndGenMsg(Execution execution, String statusCode);

    /**
     * 产权人确认过期自动流标
     *
     * @param execution
     */
    public void setFlowVar(Execution execution);


    /**
     * 产生预告信息
     *
     * @param execution
     * @param statusCode
     */
    public void genMsg(Execution execution, String statusCode);

    //发送竞价结果通知给产权人
    void sendAuctionReslutNotify(Execution execution);

    //发送竞价结果审核不通过结果给产权人
    void sendNoAuctionConfirmReslutNotify(Execution execution);

    //发送超时编辑项目通知给产权人
    void sendEditProjectNotify(Execution execution);

    //发送项目审核通知给审核人
    void  sendProjectAuditorNotify(Execution execution);

    //发送项目审核通知给所有审核人
    void sendAllAuditorGrpNotify(Execution execution);

    //发送竞拍公告通知给产权人
    void sendAuctionPlacardNotify(Execution execution);

    //发送项目暂停审核不通过通知给产权人
    void sendProjectPauseNoNotify(Execution execution);

    //发送项目质疑处理完毕继续竞拍通知给产权人
    void sendProjectContinueAuctionNotify(Execution execution);

    //发送竞价结果审核通过结果给产权人
    void sendYesAuctionConfirmReslutNotify(Execution execution);

    //发送中标公示质疑处理完毕继续公示通知给产权人
    void sendWinningContinuePublicNotify(Execution execution);

    /**
     * 产生预发（中标/流标）公告
     */
    public void genPreContent(Execution execution) throws Exception;

    public void updateAuctionEndTime(Execution execution);


    /**
     * 发布流标公告
     */
    String genFlowWebContent(WebContent web, AuctionInfo auctionInfo);

    /**
     * 产生中标通知书（中标或者流标）
     *
     * @param execution
     */
    public void genDocument(Execution execution);
}
